// stores/counter.js
import { defineStore } from 'pinia'
// 不知道为什么持久化插件不行
// import { persist } from 'pinia-plugin-persist'
export const useCounterStore = defineStore('counter', {
    state: () => {
        return {
            count: 0
        }
    },
    getters: {
        doubleCount: (state) => state.count * 2
    },
    actions: {
        increment() {
            this.count++
        },

    },
    // plugins: [persist()]
})